1. Field of the Invention
The present invention relates to the field of message queue and sequential file management and more particularly to the programmatic access to a message queue and also programmatic access to a sequential file.
2. Description of the Related Art
In the field of information technology, a message queue is a software-engineering component used for inter-process communications or inter-thread communications. The component employs a queue into which messages can be placed by a messenger and from which messages can be retrieved by a designated recipient. In this regard, the message queue can be a communicative component enabling asynchronous messaging as between the messenger and the designated recipient. Operationally, the message queue can support multiple messengers and recipients such that asynchronous communications can be achieved for a group of participants.
The asynchronous nature of the message queue provides for an ideal technology coupler for disparate technologies. Specifically, so long as separate technologies can access the message queue, the separate and disparate technologies can engage in message passing thereby enabling communications. In particular, the message queue can expose different method calls through an application programming interface (API) for opening, writing to, reading from, and closing the message queue. Each application in turn can include logic to invoke a sequence of the method calls in order to either place a message into the message queue, or to retrieve a message from the message queue.
In message queue technology, applications share data by putting and getting messages on message queues. Generally, applications put messages to queues programmatically using an API. For example, the following pseudo-code sequence is demonstrative of a process for loading a message queue with messages programmatically through program calls to a message queue API:
OPEN queue  Loop until all messages generated    Generate message    PUT message to queue  EndLoopCLOSE queue
Likewise, applications can retrieve messages from messages queues programmatically using the message queue API. For example, the following pseudo-code sequence is demonstrative of a process for retrieving messages from a message queue programmatically through program calls to a message queue API:
OPEN queue  Loop until queue-empty    GET message from queue    Process message  EndLoopCLOSE queue
In message queue technology, a queue manager manages the storage of message data using internal formats transparent to applications. Queue messages may be maintained in computer memory, or stored on a permanent medium such as on a fixed disk. As such, applications are restricted to accessing discrete message data—that is, data stripped of the internal formats of the queue manager—using the API of the queue manager, typically one message at a time.
By comparison, sequential files support data storage with less complexity than a message queue. With a sequential file, data simply can be inserted within a sequential file at a specified byte position. Likewise, with a sequential file, data can be retrieved from the sequential file at a specified or relative byte position. Accordingly, a suitable API for accessing data within a sequential file could include:
OPEN sequential file  Loop until all data generated    Generate record    WRITE record to file  EndLoopCLOSE sequential fileThus, coding to different APIs for resource access is required depending upon whether the resource is located within a message queue or a sequential file.